<script setup lang="ts">
import { ref } from "vue";

const foods = ref(['臭豆腐', '鸡屁股', '大蒜', '腐乳', '老干妈', '柠檬'])

const obj = ref({
  name: '小明',
  age: 18,
  sex: '男'
})
</script>

<template>
  <p v-for="(item, index) in foods">
    {{ index + 1 }} {{ item }}
  </p>
  <!-- ul 无序列表
  ol 有序列表 -->
  <ul>
    <li v-for="item in foods">
      {{ item }}
    </li>
  </ul>

  <ul>
    <li v-for="item in 5">测试结构</li>
  </ul>

  <ol>
    <li v-for="item in 5">测试结构</li>
  </ol>

  <ul>
    <li v-for="(value, key, index) in obj">
      {{ index }} {{ key }} {{ value }}
    </li>
  </ul>

</template>